using UnityEngine;
using UnityGameFramework.Runtime;

/// <summary>
/// 框架访问
/// </summary>
public sealed class EntityInst : MonoBehaviour
{
    public static EventComponent Event { get; private set; }
    public static UIComponent UI { get; private set; }
    public static DataTableComponent Table { get; private set; }
    public static ConfigComponent Config { get; private set; }
    public static ProcedureComponent Procedure { get; private set; }
    public static ObjectPoolComponent ObjectPool { get; private set; }
    public static ReferencePoolComponent RefPool { get; private set; }
    public static ResourceComponent Resource { get; private set; }
    public static SceneComponent Scene { get; private set; }
    public static SoundComponent Sound { get; private set; }
    public static DownloadComponent Download { get; private set; }
    public static SettingComponent Setting { get; private set; }
    public static EntityComponent Entity { get; private set; }
    public static  FsmComponent Fsm { get; private set; }
    public static  LocalizationComponent Localizer { get; private set; }
    public static NetworkComponent Network { get; private set; }
    public static LuaComponent Lua { get; private set; }


    private void Start()
    {
        Event = GameEntry.GetComponent<EventComponent>();
        UI = GameEntry.GetComponent<UIComponent>();
        Table = GameEntry.GetComponent<DataTableComponent>();
        Config = GameEntry.GetComponent<ConfigComponent>();
        Procedure = GameEntry.GetComponent<ProcedureComponent>();
        ObjectPool = GameEntry.GetComponent<ObjectPoolComponent>();
        RefPool = GameEntry.GetComponent<ReferencePoolComponent>();
        Resource = GameEntry.GetComponent<ResourceComponent>();
        Scene = GameEntry.GetComponent<SceneComponent>();
        Sound = GameEntry.GetComponent<SoundComponent>();
        Download = GameEntry.GetComponent<DownloadComponent>();
        Setting = GameEntry.GetComponent<SettingComponent>();
        Entity = GameEntry.GetComponent<EntityComponent>();
        Fsm = GameEntry.GetComponent<FsmComponent>();
        Localizer = GameEntry.GetComponent<LocalizationComponent>();
        Network = GameEntry.GetComponent<NetworkComponent>();
        Lua = GameEntry.GetComponent<LuaComponent>();
    }
}